package org.openrisk.domain;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.ManyToMany;

@Entity
public class UserRole extends Base {

	private static final long serialVersionUID = -4321141324450736956L;
	
	public static final UserRole ADMIN = new UserRole("admin");
	public static final UserRole SYSTEM = new UserRole("system");

	private String name;

	@ManyToMany (targetEntity=org.openrisk.domain.User.class, mappedBy="userRoles")
	private List<User> users = new ArrayList<User>();

	private UserRole(String name) {
		this.name = name;
	}

}
